least-squares.cpp